package com.hgdp.medicalexamination.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hgdp.medicalexamination.entity.DicRegion;
import com.hgdp.medicalexamination.mapper.DicRegionMapper;
import com.hgdp.medicalexamination.service.DicRegionService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * @param 
 * @author hgdp
 * @date 2020-07-30 10:36:49
 */

@Service
@AllArgsConstructor
public class DicRegionServiceImpl extends ServiceImpl<DicRegionMapper, DicRegion> implements DicRegionService {
	
	@Override
	public IPage<DicRegion> queryPage(Page page, DicRegion dicRegion) {
		IPage<DicRegion> pages =baseMapper.selectPage(page,Wrappers.query(dicRegion));
		page.setTotal(baseMapper.selectCount(Wrappers.query(dicRegion)));
		return pages;
	}
}